<?php

class Base_Service {
	

	protected $logger;
	private $dbAdapter;
   
	protected function __construct() {
		$this->logger = Zend_Registry::get("logger");
	}
	protected function __clone() {}
	

	/**
	 * 
	 * use this method when you want to keep different actions in a single transaction
	 * @param unknown_type $db
	 */
	public function setDbAdapter($db) {
		$this->dbAdapter = $db;
	}
	
	public function getDbAdapter() {
		if ($this->dbAdapter == null) {
			$this->dbAdapter = Zend_Db_Table::getDefaultAdapter();
		}
		return $this->dbAdapter;
	}
}

?>